/* Applies to the whole page */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}


/* Body's background colour and apply the below CSS Grid template for all screen size below min width */
body {
  background-color: #d9dcd6;
  margin: 0;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: 5% 20% 10% 20% 20% 20% auto;
  grid-template-areas:
      "navigation"
      "Project-One"
      "Project-One"
      "Project-Two"
      "Project-Three"
      "footer"; 
}

/* Apply the below CSS Grid template for all screen size above min width */
@media only screen and (min-width: 768px) {

  body {
      margin: 0;
      display: grid;
      grid-template-columns: auto 30% 30% 30%;
      grid-template-rows: repeat(7, auto);
      grid-template-areas:
          "logo navigation navigation navigation"
          "hero hero hero hero"
          "sidebar About-Me  About-Me  About-Me"
          "sidebar Project-One  Project-One  Project-One"
          "sidebar Project-One  Project-One  Project-One"
          "sidebar Project-Two   Project-Two   Project-Three"
          "footer footer footer footer";
  }

}

/* Navigation links' position, font and size */
#navigation {
  grid-area: navigation;
  display: inline;
  padding-top: 15px;
  margin-right: 20px;
  float: right;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-size: 20px;
}


/* Take out navigation's unordered list's markings */
ul {
  list-style-type: none;
}

/* Display list inline */
ul li {
  display: inline-block;
  margin-left: 10%;
}


/* Colour of the a elements */
a {
  color: #000000;
  text-decoration: none;
}

/* Sidebar's CSS grid name and background colour */
aside {
  grid-area: sidebar;
  background-color: #ffffff;
}

/* Sidebar's list spacing */
aside ul li {
  vertical-align: top;
  top: 1px;
  margin-left: 10%;
  line-height: 150px;
}

/* Header's CSS grid name and background colour */
header {
  background-color: #ffffff;
  text-align: center;
}

/* Logo's CSS grid name */
#logo{
  grid-area: logo;
}

/* Logo's image sizing */
#logo img {
  width: 100%;
  object-fit: cover;

}

/* Hero's CSS grid name and colour */
#hero {
  grid-area: hero;
  max-height: 100%;
  position: relative;
  width: 100%;
  margin-bottom: 5px;
  background-image: url("../images/hansal\ image.jpg");
  background-size: cover;
  background-position: center;
}

/* Hero's caption, alignment and colour */
#hero figcaption {
  width: 40%;
  position: relative;
  left: 700px;
  text-align: right;
  font-size: 22px;
  font-style: italic;
  line-height: 1.5;
  background: #000000;
  color: #ffffff;
  padding-right: 20px;
}

/* About Me's CSS grid name and background colour */
#About-Me {
  grid-area: About-Me;
  background-color: #ffffff;
}

/* About Me's p element position */
#About-Me p {
  position: relative;
}

/* Project One's CSS grid name and background colour */
#Project-One {
  grid-area: Project-One;
  background-color: #ffffff;
}

/* Project Two's CSS grid name and background colour */
#Project-Two {
  grid-area: Project-Two;
  background-color: #ffffff;
}

/* Project Three's CSS grid name and background colour */
#Project-Three {
  grid-area: Project-Three;
  background-color: #ffffff;
}

/*All three section's padding*/
#Project-One, #Project-Two, #Project-Three {
padding: 10px;
}


/* All three section's caption, alignment and background colour */
#Project-One figcaption, #Project-Two figcaption, #Project-Three figcaption {
  width: 150px;
  position: relative;
  bottom: 100px;
  left: 1px;
  text-align: right;
  font-size: 10px;
  font-style: italic;
  background: #000000;
  color: #ffffff;
  padding-right: 20px;
} 

/* Project One's image size and transition time */
#Project-One img {
  max-height: 475px;
  width: 100%;
  object-fit: cover;
  opacity:0.5;
  transition: 1s ease;
}

/* Project Two and Three's image size and transition time */
#Project-Two img, #Project-Three img {
  max-height: 230px;
  width: 100%;
  object-fit: cover;
  opacity:0.5;
  transition: 1s ease;
}

/* All three section's box shadow and transition time */
#Project-One img:hover, #Project-Two img:hover, #Project-Three img:hover{
  opacity:1;
  box-shadow: 0 0 0 10px #000000;
  transition: 1s ease;
  }

/* Footer's CSS grid name and background colour */
footer {
  grid-area: footer;
  background-color: #ffffff;
}

/* Footer's h2 alignment */
#Contact h2{
  margin-left: 20px;
  padding-top: 5px;
}
